@extends('Admin.layout.layout')
 @section('title')
    <title>文章添加</title>
    <script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.config.js')}}"></script>
    <script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.all.min.js')}}"> </script>
    
    <script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/lang/zh-cn/zh-cn.jsSS')}}"></script>
    @show
@section('con')
<div class="row"> 
   <div class="col-lg-12"> 
    <h1 class="page-header">添加文章</h1> 
   </div> 
   <!-- /.col-lg-12 --> 
  </div> 
  <!-- /.row --> 
  <div class="row"> 
   <div class="col-lg-12"> 
    <div class="panel panel-default"> 
     <div class="panel-heading">
      
     </div> 
     <div class="row">
      
     </div> 


     <div class="panel-body"> 
      <div class="row col-xd-4 col-xd-offset-4"> 
       <div class="col-md-6 col-md-offset-3">
      
       <div class="col-md-6 col-md-offset-3">
      
        <form role="form" action="{{url('/admin/artl/insert')}}" method="post"> 
      <div class="row col-xd-6 col-xd-offset-1"> 
       <div class="col-md-8 col-md-offset-2">
         @if (count($errors) > 0)
          <div class="alert alert-danger">
              <ul>
                  @foreach ($errors->all() as $error)
                      <li>{{ $error }}</li>
                  @endforeach
              </ul>
          </div>
      @endif
       <div class="col-md-12">
      
        <form role="form" action="{{url('/admin/artl/insert')}}" method="post" enctype="multipart/form-data"> 
         <select class="form-control" name="uid">
          <option selected >选择添加文章板块</option>
          @foreach($cates as $k =>$v)
          <option value="{{$v->id}}">{{$v->name}}</option>
          @endforeach
        </select>
        <br>
        <div class="form-group">
        <label>文章是否展示</label>
        <select class="form-control" name="status">
            <option value="0">不展示</option>
            <option value="1">展示</option>
        </select>
        </div>
        <div class="form-group"> 
          <label>文章标题</label> 
          <input class="form-control" name="title" /> 
        </div class="row col-md-6 col-offset-3"> 
        </div class="row col-md-8 col-offset-3"> 
        <div class="form-group"> 
          <label>文章原作者</label> 
          <input class="form-control" name="author" /> 
        </div class="row col-md-6 col-offset-3"> 
        <div class="form-group"> 
          <label>文章发布者</label> 
          <input class="form-control" name="pauthor" /> 
        </div class="row col-md-6 col-offset-3">
        <script id="editor" name="content" type="text/plain" style="width:500px;"></script>
         <div class="form-group"> 
          <label>文章头图</label> 
          <input type="file"  name="pic" /> 
        </div class="row col-md-6 col-offset-3">
         <div class="form-group"> 
          <label>文章简介</label> 
          <textarea name="cont" id="" cols="87" rows="5"></textarea>
        </div class="row col-md-6 col-offset-3">
        <label>文章内容</label>
        <script id="editor" name="content" type="text/plain" style="width:700px;height:500px"></script>
        <button class="btn btn-success" type="submit">确定</button>
         {{csrf_field()}}
         
        </form>
         <div class="form-group"> 
         </div>  
       <!-- /.col-lg-6 (nested) --> 
       </div>
       </div>
      </div> 
      <!-- /.row (nested) --> 
     </div> 
     <!-- /.panel-body --> 
    </div> 
    <!-- /.panel --> 
   </div> 
   <!-- /.col-lg-12 --> 
  </div> 
  <!-- /.row --> 

           


@endsection
@section('js')
    <script type="text/javascript">
   
        var ue = UE.getEditor('editor');

    </script>
@endsection